
import platform
from enum import Enum


class OperatingSystem(Enum):
    WINDOWS = 'Windows'
    LINUX = 'Linux'
    MACOS = 'Darwin'
    OTHER = 'Other'
     
def current_os_name():
    """

    """
    # 获取当前操作系统
    current_os = platform.system()

    # 根据当前操作系统返回相应的枚举值
    if current_os == OperatingSystem.WINDOWS.value:
        os_enum = OperatingSystem.WINDOWS
    elif current_os == OperatingSystem.LINUX.value:
        os_enum = OperatingSystem.LINUX
    elif current_os == OperatingSystem.MACOS.value:
        os_enum = OperatingSystem.MACOS
    else:
        os_enum = OperatingSystem.OTHER
    return os_enum
